<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.4"/>
<title>AndBase开发框架: com.ab.util.AbFileUtil类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="ic_launcher.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">AndBase开发框架
   &#160;<span id="projectnumber">1.5.7</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.4 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>首页</span></a></li>
      <li><a href="pages.html"><span>相关页面</span></a></li>
      <li><a href="namespaces.html"><span>命名空间</span></a></li>
      <li class="current"><a href="annotated.html"><span>类</span></a></li>
      <li><a href="files.html"><span>文件</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="搜索" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>类列表</span></a></li>
      <li><a href="classes.html"><span>类索引</span></a></li>
      <li><a href="hierarchy.html"><span>类继承关系</span></a></li>
      <li><a href="functions.html"><span>类成员</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>全部</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>类</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>命名空间</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>文件</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>函数</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>变量</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>枚举值</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>页</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacecom.html">com</a></li><li class="navelem"><a class="el" href="namespacecom_1_1ab.html">ab</a></li><li class="navelem"><a class="el" href="namespacecom_1_1ab_1_1util.html">util</a></li><li class="navelem"><a class="el" href="classcom_1_1ab_1_1util_1_1_ab_file_util.html">AbFileUtil</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">类</a> &#124;
<a href="#pub-static-methods">静态 Public 成员函数</a> &#124;
<a href="#pri-static-attribs">静态 Private 属性</a> &#124;
<a href="classcom_1_1ab_1_1util_1_1_ab_file_util-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">com.ab.util.AbFileUtil类 参考</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
类</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1ab_1_1util_1_1_ab_file_util_1_1_file_last_modif_sort.html">FileLastModifSort</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
静态 Public 成员函数</h2></td></tr>
<tr class="memitem:af600d4046bef1269a8ba08ef60da83c6"><td class="memItemLeft" align="right" valign="top">static String&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1ab_1_1util_1_1_ab_file_util.html#af600d4046bef1269a8ba08ef60da83c6">downFileToSD</a> (String url, String name)</td></tr>
<tr class="separator:af600d4046bef1269a8ba08ef60da83c6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4eaa623e91d82667f4a0602e4ecc5873"><td class="memItemLeft" align="right" valign="top">static Bitmap&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1ab_1_1util_1_1_ab_file_util.html#a4eaa623e91d82667f4a0602e4ecc5873">getBitmapFromSDCache</a> (String url, int type, int width, int height)</td></tr>
<tr class="separator:a4eaa623e91d82667f4a0602e4ecc5873"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0437b75086999026064dca170c27e704"><td class="memItemLeft" align="right" valign="top">static Bitmap&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1ab_1_1util_1_1_ab_file_util.html#a0437b75086999026064dca170c27e704">getBitmapFromSD</a> (String url, int type, int width, int height)</td></tr>
<tr class="separator:a0437b75086999026064dca170c27e704"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac4ab3e71fc5d92f9feaa24c79bae5844"><td class="memItemLeft" align="right" valign="top">static Bitmap&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1ab_1_1util_1_1_ab_file_util.html#ac4ab3e71fc5d92f9feaa24c79bae5844">getBitmapFromSD</a> (File file, int type, int newWidth, int newHeight)</td></tr>
<tr class="separator:ac4ab3e71fc5d92f9feaa24c79bae5844"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2ff5a538ee98e69b81a96ae8511a9a26"><td class="memItemLeft" align="right" valign="top">static Bitmap&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1ab_1_1util_1_1_ab_file_util.html#a2ff5a538ee98e69b81a96ae8511a9a26">getBitmapFromSD</a> (File file)</td></tr>
<tr class="separator:a2ff5a538ee98e69b81a96ae8511a9a26"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a92cb62003da97a5fa72227b52e443d06"><td class="memItemLeft" align="right" valign="top">static Bitmap&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1ab_1_1util_1_1_ab_file_util.html#a92cb62003da97a5fa72227b52e443d06">getBitmapFormByte</a> (byte[] imgByte, String fileName, int type, int newWidth, int newHeight)</td></tr>
<tr class="separator:a92cb62003da97a5fa72227b52e443d06"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab5a2d9d2d9299c3ccc9d0f2c97df72c8"><td class="memItemLeft" align="right" valign="top">static Bitmap&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1ab_1_1util_1_1_ab_file_util.html#ab5a2d9d2d9299c3ccc9d0f2c97df72c8">getBitmapFormURL</a> (String url, int type, int newWidth, int newHeight)</td></tr>
<tr class="separator:ab5a2d9d2d9299c3ccc9d0f2c97df72c8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af7db10b29db35da2ff6052233375a84b"><td class="memItemLeft" align="right" valign="top">static Bitmap&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1ab_1_1util_1_1_ab_file_util.html#af7db10b29db35da2ff6052233375a84b">getBitmapFormSrc</a> (String src)</td></tr>
<tr class="separator:af7db10b29db35da2ff6052233375a84b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac611d95555de52d4beafd869b42ab2da"><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1ab_1_1util_1_1_ab_file_util.html#ac611d95555de52d4beafd869b42ab2da">getContentLengthFormUrl</a> (String Url)</td></tr>
<tr class="separator:ac611d95555de52d4beafd869b42ab2da"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a94ea13ad52122cbbb32b8a6b69a1e0a6"><td class="memItemLeft" align="right" valign="top">static String&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1ab_1_1util_1_1_ab_file_util.html#a94ea13ad52122cbbb32b8a6b69a1e0a6">getRealFileNameFromUrl</a> (String url)</td></tr>
<tr class="separator:a94ea13ad52122cbbb32b8a6b69a1e0a6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a809466cdd32ebf1be86a63058dd4ad97"><td class="memItemLeft" align="right" valign="top">static String&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1ab_1_1util_1_1_ab_file_util.html#a809466cdd32ebf1be86a63058dd4ad97">getFileNameFromUrl</a> (String url, HttpResponse response)</td></tr>
<tr class="separator:a809466cdd32ebf1be86a63058dd4ad97"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abc26bc26a8ab6f1cba75e638d6e1b884"><td class="memItemLeft" align="right" valign="top">static String&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1ab_1_1util_1_1_ab_file_util.html#abc26bc26a8ab6f1cba75e638d6e1b884">getFileNameFromUrl</a> (String url)</td></tr>
<tr class="separator:abc26bc26a8ab6f1cba75e638d6e1b884"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab66ef9df708d3d016f120dcb0398da90"><td class="memItemLeft" align="right" valign="top">static String&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1ab_1_1util_1_1_ab_file_util.html#ab66ef9df708d3d016f120dcb0398da90">getSuffixFromNetUrl</a> (String url)</td></tr>
<tr class="separator:ab66ef9df708d3d016f120dcb0398da90"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad298d70a048b3433add717678482bdad"><td class="memItemLeft" align="right" valign="top">static byte[]&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1ab_1_1util_1_1_ab_file_util.html#ad298d70a048b3433add717678482bdad">getByteArrayFromSD</a> (String path)</td></tr>
<tr class="separator:ad298d70a048b3433add717678482bdad"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9547e4ee4917d8ce7fe3f31dc6a710d4"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1ab_1_1util_1_1_ab_file_util.html#a9547e4ee4917d8ce7fe3f31dc6a710d4">writeByteArrayToSD</a> (String path, byte[] content, boolean create)</td></tr>
<tr class="separator:a9547e4ee4917d8ce7fe3f31dc6a710d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a30c6eec22f711e93f950ed194fa7f001"><td class="memItemLeft" align="right" valign="top">static boolean&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1ab_1_1util_1_1_ab_file_util.html#a30c6eec22f711e93f950ed194fa7f001">isCanUseSD</a> ()</td></tr>
<tr class="separator:a30c6eec22f711e93f950ed194fa7f001"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae4f6a3b3d7acb554c7e55976ea16a9a1"><td class="memItemLeft" align="right" valign="top">static String&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1ab_1_1util_1_1_ab_file_util.html#ae4f6a3b3d7acb554c7e55976ea16a9a1">getDownPathImageDir</a> ()</td></tr>
<tr class="separator:ae4f6a3b3d7acb554c7e55976ea16a9a1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a95e398165504901535781306d59e4de3"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1ab_1_1util_1_1_ab_file_util.html#a95e398165504901535781306d59e4de3">setDownPathImageDir</a> (String <a class="el" href="classcom_1_1ab_1_1util_1_1_ab_file_util.html#a2c771520f971adcd855e6c4f5415957d">downPathImageDir</a>)</td></tr>
<tr class="separator:a95e398165504901535781306d59e4de3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a71ad75f5d46c9dd585e0ae41954533fb"><td class="memItemLeft" align="right" valign="top">static String&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1ab_1_1util_1_1_ab_file_util.html#a71ad75f5d46c9dd585e0ae41954533fb">getDownPathFileDir</a> ()</td></tr>
<tr class="separator:a71ad75f5d46c9dd585e0ae41954533fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af6aede34a374aac11e3e366de7b91e8e"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1ab_1_1util_1_1_ab_file_util.html#af6aede34a374aac11e3e366de7b91e8e">setDownPathFileDir</a> (String <a class="el" href="classcom_1_1ab_1_1util_1_1_ab_file_util.html#a4a615fccc564de0151eabc1eb0570348">downPathFileDir</a>)</td></tr>
<tr class="separator:af6aede34a374aac11e3e366de7b91e8e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaaa66d3e861af5b1465eb9e9938ee035"><td class="memItemLeft" align="right" valign="top">static String&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1ab_1_1util_1_1_ab_file_util.html#aaaa66d3e861af5b1465eb9e9938ee035">getFullImageDownPathDir</a> ()</td></tr>
<tr class="separator:aaaa66d3e861af5b1465eb9e9938ee035"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ace63a52db9fb76eb63fefe57fdc7f798"><td class="memItemLeft" align="right" valign="top">static boolean&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1ab_1_1util_1_1_ab_file_util.html#ace63a52db9fb76eb63fefe57fdc7f798">initFileCache</a> ()</td></tr>
<tr class="separator:ace63a52db9fb76eb63fefe57fdc7f798"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abb53417902e5160f8376819fd609f4f1"><td class="memItemLeft" align="right" valign="top">static boolean&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1ab_1_1util_1_1_ab_file_util.html#abb53417902e5160f8376819fd609f4f1">freeCacheFiles</a> ()</td></tr>
<tr class="separator:abb53417902e5160f8376819fd609f4f1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a25605d027509a5c4679ddce82684200a"><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1ab_1_1util_1_1_ab_file_util.html#a25605d027509a5c4679ddce82684200a">freeSpaceOnSD</a> ()</td></tr>
<tr class="separator:a25605d027509a5c4679ddce82684200a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a88828b8ecb42627649c03a38758789fa"><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1ab_1_1util_1_1_ab_file_util.html#a88828b8ecb42627649c03a38758789fa">getFreeSdSpaceNeededToCache</a> ()</td></tr>
<tr class="separator:a88828b8ecb42627649c03a38758789fa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac4d112cafb7c09689c2c6a0d434e3b74"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1ab_1_1util_1_1_ab_file_util.html#ac4d112cafb7c09689c2c6a0d434e3b74">setFreeSdSpaceNeededToCache</a> (int <a class="el" href="classcom_1_1ab_1_1util_1_1_ab_file_util.html#a3c8428208f331b36f68c364dca77d25a">freeSdSpaceNeededToCache</a>)</td></tr>
<tr class="separator:ac4d112cafb7c09689c2c6a0d434e3b74"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8eba2bfdc23501a9bf4a24f52f086271"><td class="memItemLeft" align="right" valign="top">static boolean&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1ab_1_1util_1_1_ab_file_util.html#a8eba2bfdc23501a9bf4a24f52f086271">removeAllFileCache</a> ()</td></tr>
<tr class="separator:a8eba2bfdc23501a9bf4a24f52f086271"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2e56a1fcdaf2baaa8dd8c9dfb1638028"><td class="memItemLeft" align="right" valign="top">static String&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1ab_1_1util_1_1_ab_file_util.html#a2e56a1fcdaf2baaa8dd8c9dfb1638028">readAssetsByName</a> (Context context, String name, String encoding)</td></tr>
<tr class="separator:a2e56a1fcdaf2baaa8dd8c9dfb1638028"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a83376fe7c03c9e923330af9ff8c59fa2"><td class="memItemLeft" align="right" valign="top">static String&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1ab_1_1util_1_1_ab_file_util.html#a83376fe7c03c9e923330af9ff8c59fa2">readRawByName</a> (Context context, int id, String encoding)</td></tr>
<tr class="separator:a83376fe7c03c9e923330af9ff8c59fa2"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-static-attribs"></a>
静态 Private 属性</h2></td></tr>
<tr class="memitem:a338977897fc5713eda4d1061c99f7a03"><td class="memItemLeft" align="right" valign="top">static String&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1ab_1_1util_1_1_ab_file_util.html#a338977897fc5713eda4d1061c99f7a03">TAG</a> = &quot;AbFileUtil&quot;</td></tr>
<tr class="separator:a338977897fc5713eda4d1061c99f7a03"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae56d3140918da891c935b35e25174335"><td class="memItemLeft" align="right" valign="top">static final boolean&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1ab_1_1util_1_1_ab_file_util.html#ae56d3140918da891c935b35e25174335">D</a> = <a class="el" href="classcom_1_1ab_1_1global_1_1_ab_app_data.html#acd537fab5c27e4f2c7cb650ab1a5bd5d">AbAppData.DEBUG</a></td></tr>
<tr class="separator:ae56d3140918da891c935b35e25174335"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2087267faa9a19e330cee29793a71942"><td class="memItemLeft" align="right" valign="top">static String&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1ab_1_1util_1_1_ab_file_util.html#a2087267faa9a19e330cee29793a71942">downPathRootDir</a> = File.separator + &quot;download&quot; + File.separator</td></tr>
<tr class="separator:a2087267faa9a19e330cee29793a71942"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2c771520f971adcd855e6c4f5415957d"><td class="memItemLeft" align="right" valign="top">static String&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1ab_1_1util_1_1_ab_file_util.html#a2c771520f971adcd855e6c4f5415957d">downPathImageDir</a> = <a class="el" href="classcom_1_1ab_1_1util_1_1_ab_file_util.html#a2087267faa9a19e330cee29793a71942">downPathRootDir</a> + &quot;cache_images&quot; + File.separator</td></tr>
<tr class="separator:a2c771520f971adcd855e6c4f5415957d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4a615fccc564de0151eabc1eb0570348"><td class="memItemLeft" align="right" valign="top">static String&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1ab_1_1util_1_1_ab_file_util.html#a4a615fccc564de0151eabc1eb0570348">downPathFileDir</a> = <a class="el" href="classcom_1_1ab_1_1util_1_1_ab_file_util.html#a2087267faa9a19e330cee29793a71942">downPathRootDir</a> + &quot;cache_files&quot; + File.separator</td></tr>
<tr class="separator:a4a615fccc564de0151eabc1eb0570348"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a96f4202d52cb1faaff5d0aa295d3e6f3"><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1ab_1_1util_1_1_ab_file_util.html#a96f4202d52cb1faaff5d0aa295d3e6f3">MB</a> = 1024*1024</td></tr>
<tr class="separator:a96f4202d52cb1faaff5d0aa295d3e6f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3c8428208f331b36f68c364dca77d25a"><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1ab_1_1util_1_1_ab_file_util.html#a3c8428208f331b36f68c364dca77d25a">freeSdSpaceNeededToCache</a> = 200*<a class="el" href="classcom_1_1ab_1_1util_1_1_ab_file_util.html#a96f4202d52cb1faaff5d0aa295d3e6f3">MB</a></td></tr>
<tr class="separator:a3c8428208f331b36f68c364dca77d25a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>描述：文件操作类.</p>
<dl class="section author"><dt>作者</dt><dd>zhaoqp </dd></dl>
<dl class="section date"><dt>日期</dt><dd>2011-12-10 </dd></dl>
<dl class="section version"><dt>版本</dt><dd>v1.0 </dd></dl>
</div><h2 class="groupheader">成员函数说明</h2>
<a class="anchor" id="af600d4046bef1269a8ba08ef60da83c6"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static String com.ab.util.AbFileUtil.downFileToSD </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>url</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>name</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>下载网络文件到SD卡中.如果SD中存在同名文件将不再下载 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">url</td><td>要下载文件的网络地址 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>下载好的本地文件地址 </dd></dl>

</div>
</div>
<a class="anchor" id="abb53417902e5160f8376819fd609f4f1"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static boolean com.ab.util.AbFileUtil.freeCacheFiles </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>释放部分文件， 当文件总大小大于规定的AbFileCache.maxCacheSize或者sdcard剩余空间小于FREE_SD_SPACE_NEEDED_TO_CACHE的规定 那么删除40最近没有被使用的文件 </p>

</div>
</div>
<a class="anchor" id="a25605d027509a5c4679ddce82684200a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static int com.ab.util.AbFileUtil.freeSpaceOnSD </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>计算sdcard上的剩余空间 </p>

</div>
</div>
<a class="anchor" id="a92cb62003da97a5fa72227b52e443d06"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static Bitmap com.ab.util.AbFileUtil.getBitmapFormByte </td>
          <td>(</td>
          <td class="paramtype">byte[]&#160;</td>
          <td class="paramname"><em>imgByte</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>fileName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>newWidth</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>newHeight</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>描述：将图片的byte[]写入本地文件. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">imgByte</td><td>图片的byte[]形势 </td></tr>
    <tr><td class="paramname">fileName</td><td>文件名称，需要包含后缀，如.jpg </td></tr>
    <tr><td class="paramname">type</td><td>图片的处理类型（剪切或者缩放到指定大小，参考AbConstant类） </td></tr>
    <tr><td class="paramname">newWidth</td><td>新图片的宽 </td></tr>
    <tr><td class="paramname">newHeight</td><td>新图片的高 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>Bitmap 新图片 </dd></dl>

</div>
</div>
<a class="anchor" id="af7db10b29db35da2ff6052233375a84b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static Bitmap com.ab.util.AbFileUtil.getBitmapFormSrc </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>src</em>)</td><td></td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>描述：获取src中的图片资源.</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>图片的src路径，如（“image/arrow.png”） </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>Bitmap 图片 </dd></dl>

</div>
</div>
<a class="anchor" id="ab5a2d9d2d9299c3ccc9d0f2c97df72c8"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static Bitmap com.ab.util.AbFileUtil.getBitmapFormURL </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>url</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>newWidth</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>newHeight</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>描述：根据URL从互连网获取图片. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">url</td><td>要下载文件的网络地址 </td></tr>
    <tr><td class="paramname">type</td><td>图片的处理类型（剪切或者缩放到指定大小，参考AbConstant类） </td></tr>
    <tr><td class="paramname">newWidth</td><td>新图片的宽 </td></tr>
    <tr><td class="paramname">newHeight</td><td>新图片的高 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>Bitmap 新图片 </dd></dl>

</div>
</div>
<a class="anchor" id="a0437b75086999026064dca170c27e704"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static Bitmap com.ab.util.AbFileUtil.getBitmapFromSD </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>url</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>width</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>height</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>描述：通过文件的网络地址从SD卡中读取图片. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">url</td><td>文件的网络地址 </td></tr>
    <tr><td class="paramname">type</td><td>图片的处理类型（剪切或者缩放到指定大小，参考AbConstant类） 如果设置为原图，则后边参数无效，得到原图 </td></tr>
    <tr><td class="paramname">width</td><td>新图片的宽 </td></tr>
    <tr><td class="paramname">height</td><td>新图片的高 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>Bitmap 新图片 </dd></dl>

</div>
</div>
<a class="anchor" id="ac4ab3e71fc5d92f9feaa24c79bae5844"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static Bitmap com.ab.util.AbFileUtil.getBitmapFromSD </td>
          <td>(</td>
          <td class="paramtype">File&#160;</td>
          <td class="paramname"><em>file</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>newWidth</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>newHeight</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>描述：通过文件的本地地址从SD卡读取图片.</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">file</td><td>the file </td></tr>
    <tr><td class="paramname">type</td><td>图片的处理类型（剪切或者缩放到指定大小，参考AbConstant类） 如果设置为原图，则后边参数无效，得到原图 </td></tr>
    <tr><td class="paramname">newWidth</td><td>新图片的宽 </td></tr>
    <tr><td class="paramname">newHeight</td><td>新图片的高 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>Bitmap 新图片 </dd></dl>

</div>
</div>
<a class="anchor" id="a2ff5a538ee98e69b81a96ae8511a9a26"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static Bitmap com.ab.util.AbFileUtil.getBitmapFromSD </td>
          <td>(</td>
          <td class="paramtype">File&#160;</td>
          <td class="paramname"><em>file</em>)</td><td></td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>描述：通过文件的本地地址从SD卡读取图片.</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">file</td><td>the file </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>Bitmap 图片 </dd></dl>

</div>
</div>
<a class="anchor" id="a4eaa623e91d82667f4a0602e4ecc5873"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static Bitmap com.ab.util.AbFileUtil.getBitmapFromSDCache </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>url</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>width</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>height</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>描述：通过文件的网络地址从SD卡中读取图片，如果SD中没有则自动下载并保存. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">url</td><td>文件的网络地址 </td></tr>
    <tr><td class="paramname">type</td><td>图片的处理类型（剪切或者缩放到指定大小，参考AbConstant类） 如果设置为原图，则后边参数无效，得到原图 </td></tr>
    <tr><td class="paramname">width</td><td>新图片的宽 </td></tr>
    <tr><td class="paramname">height</td><td>新图片的高 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>Bitmap 新图片 </dd></dl>

</div>
</div>
<a class="anchor" id="ad298d70a048b3433add717678482bdad"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static byte [] com.ab.util.AbFileUtil.getByteArrayFromSD </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>path</em>)</td><td></td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>描述：从sd卡中的文件读取到byte[].</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">path</td><td>sd卡中文件路径 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>byte[] </dd></dl>

</div>
</div>
<a class="anchor" id="ac611d95555de52d4beafd869b42ab2da"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static int com.ab.util.AbFileUtil.getContentLengthFormUrl </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>Url</em>)</td><td></td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>描述：获取网络文件的大小.</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">Url</td><td>图片的网络路径 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>int 网络文件的大小 </dd></dl>

</div>
</div>
<a class="anchor" id="a71ad75f5d46c9dd585e0ae41954533fb"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static String com.ab.util.AbFileUtil.getDownPathFileDir </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Gets the down path file dir.</p>
<dl class="section return"><dt>返回</dt><dd>the down path file dir </dd></dl>

</div>
</div>
<a class="anchor" id="ae4f6a3b3d7acb554c7e55976ea16a9a1"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static String com.ab.util.AbFileUtil.getDownPathImageDir </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>描述：获得当前下载的地址. </p>
<dl class="section return"><dt>返回</dt><dd>下载的地址（默认SD卡download） </dd></dl>

</div>
</div>
<a class="anchor" id="a809466cdd32ebf1be86a63058dd4ad97"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static String com.ab.util.AbFileUtil.getFileNameFromUrl </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>url</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">HttpResponse&#160;</td>
          <td class="paramname"><em>response</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>获取文件名，外链模式和通过网络获取. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">url</td><td>文件地址 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>文件名 </dd></dl>

</div>
</div>
<a class="anchor" id="abc26bc26a8ab6f1cba75e638d6e1b884"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static String com.ab.util.AbFileUtil.getFileNameFromUrl </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>url</em>)</td><td></td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>获取文件名，外链模式和通过网络获取. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">url</td><td>文件地址 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>文件名 </dd></dl>

</div>
</div>
<a class="anchor" id="a88828b8ecb42627649c03a38758789fa"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static int com.ab.util.AbFileUtil.getFreeSdSpaceNeededToCache </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>描述：剩余空间大于多少B才使用缓存 </p>
<dl class="section return"><dt>返回</dt><dd></dd></dl>
<dl class="exception"><dt>异常</dt><dd>
  <table class="exception">
    <tr><td class="paramname"></td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="aaaa66d3e861af5b1465eb9e9938ee035"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static String com.ab.util.AbFileUtil.getFullImageDownPathDir </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>描述：获取默认的图片保存全路径.</p>
<dl class="section return"><dt>返回</dt><dd>完成的存储目录 </dd></dl>

</div>
</div>
<a class="anchor" id="a94ea13ad52122cbbb32b8a6b69a1e0a6"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static String com.ab.util.AbFileUtil.getRealFileNameFromUrl </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>url</em>)</td><td></td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>获取文件名，通过网络获取. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">url</td><td>文件地址 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>文件名 </dd></dl>

</div>
</div>
<a class="anchor" id="ab66ef9df708d3d016f120dcb0398da90"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static String com.ab.util.AbFileUtil.getSuffixFromNetUrl </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>url</em>)</td><td></td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>获取文件后缀. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">url</td><td>文件地址 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>文件后缀 </dd></dl>

</div>
</div>
<a class="anchor" id="ace63a52db9fb76eb63fefe57fdc7f798"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static boolean com.ab.util.AbFileUtil.initFileCache </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>初始化缓存 </p>

</div>
</div>
<a class="anchor" id="a30c6eec22f711e93f950ed194fa7f001"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static boolean com.ab.util.AbFileUtil.isCanUseSD </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>描述：SD卡是否能用.</p>
<dl class="section return"><dt>返回</dt><dd>true 可用,false不可用 </dd></dl>

</div>
</div>
<a class="anchor" id="a2e56a1fcdaf2baaa8dd8c9dfb1638028"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static String com.ab.util.AbFileUtil.readAssetsByName </td>
          <td>(</td>
          <td class="paramtype">Context&#160;</td>
          <td class="paramname"><em>context</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>encoding</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>描述：读取Assets目录的文件内容 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">context</td><td></td></tr>
    <tr><td class="paramname">name</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd></dd></dl>
<dl class="exception"><dt>异常</dt><dd>
  <table class="exception">
    <tr><td class="paramname"></td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a83376fe7c03c9e923330af9ff8c59fa2"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static String com.ab.util.AbFileUtil.readRawByName </td>
          <td>(</td>
          <td class="paramtype">Context&#160;</td>
          <td class="paramname"><em>context</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>encoding</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>描述：读取Raw目录的文件内容 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">context</td><td></td></tr>
    <tr><td class="paramname">id</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd></dd></dl>
<dl class="exception"><dt>异常</dt><dd>
  <table class="exception">
    <tr><td class="paramname"></td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a8eba2bfdc23501a9bf4a24f52f086271"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static boolean com.ab.util.AbFileUtil.removeAllFileCache </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>删除所有缓存文件 </p>

</div>
</div>
<a class="anchor" id="af6aede34a374aac11e3e366de7b91e8e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void com.ab.util.AbFileUtil.setDownPathFileDir </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>downPathFileDir</em>)</td><td></td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>描述：设置文件的下载保存路径（默认SD卡download/cache_files）. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">downPathFileDir</td><td>文件的下载保存路径 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a95e398165504901535781306d59e4de3"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void com.ab.util.AbFileUtil.setDownPathImageDir </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>downPathImageDir</em>)</td><td></td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>描述：设置图片文件的下载保存路径（默认SD卡download/cache_images）. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">downPathImageDir</td><td>图片文件的下载保存路径 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ac4d112cafb7c09689c2c6a0d434e3b74"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void com.ab.util.AbFileUtil.setFreeSdSpaceNeededToCache </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>freeSdSpaceNeededToCache</em>)</td><td></td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>描述：剩余空间大于多少B才使用缓存 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">freeSdSpaceNeededToCache</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="exception"><dt>异常</dt><dd>
  <table class="exception">
    <tr><td class="paramname"></td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a9547e4ee4917d8ce7fe3f31dc6a710d4"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void com.ab.util.AbFileUtil.writeByteArrayToSD </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">byte[]&#160;</td>
          <td class="paramname"><em>content</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">boolean&#160;</td>
          <td class="paramname"><em>create</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>描述：将byte数组写入文件.</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">path</td><td>the path </td></tr>
    <tr><td class="paramname">content</td><td>the content </td></tr>
    <tr><td class="paramname">create</td><td>the create </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">类成员变量说明</h2>
<a class="anchor" id="ae56d3140918da891c935b35e25174335"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">final boolean com.ab.util.AbFileUtil.D = <a class="el" href="classcom_1_1ab_1_1global_1_1_ab_app_data.html#acd537fab5c27e4f2c7cb650ab1a5bd5d">AbAppData.DEBUG</a></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>The Constant D. </p>

</div>
</div>
<a class="anchor" id="a4a615fccc564de0151eabc1eb0570348"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">String com.ab.util.AbFileUtil.downPathFileDir = <a class="el" href="classcom_1_1ab_1_1util_1_1_ab_file_util.html#a2087267faa9a19e330cee29793a71942">downPathRootDir</a> + &quot;cache_files&quot; + File.separator</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>默认下载文件地址. </p>

</div>
</div>
<a class="anchor" id="a2c771520f971adcd855e6c4f5415957d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">String com.ab.util.AbFileUtil.downPathImageDir = <a class="el" href="classcom_1_1ab_1_1util_1_1_ab_file_util.html#a2087267faa9a19e330cee29793a71942">downPathRootDir</a> + &quot;cache_images&quot; + File.separator</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>默认下载图片文件地址. </p>

</div>
</div>
<a class="anchor" id="a2087267faa9a19e330cee29793a71942"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">String com.ab.util.AbFileUtil.downPathRootDir = File.separator + &quot;download&quot; + File.separator</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>默认下载文件地址. </p>

</div>
</div>
<a class="anchor" id="a3c8428208f331b36f68c364dca77d25a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int com.ab.util.AbFileUtil.freeSdSpaceNeededToCache = 200*<a class="el" href="classcom_1_1ab_1_1util_1_1_ab_file_util.html#a96f4202d52cb1faaff5d0aa295d3e6f3">MB</a></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>剩余空间大于200M才使用缓存 </p>

</div>
</div>
<a class="anchor" id="a96f4202d52cb1faaff5d0aa295d3e6f3"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int com.ab.util.AbFileUtil.MB = 1024*1024</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>MB 单位B </p>

</div>
</div>
<a class="anchor" id="a338977897fc5713eda4d1061c99f7a03"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">String com.ab.util.AbFileUtil.TAG = &quot;AbFileUtil&quot;</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>The tag. </p>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>src/com/ab/util/<a class="el" href="_ab_file_util_8java.html">AbFileUtil.java</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
生成于 2014年 三月 19日 星期三 16:24:29 , 为 AndBase开发框架使用  &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.4
</small></address>
</body>
</html>
